import Vue from 'vue';
import Router from 'vue-router';

import Index from '@/pages/index.vue';

import Purchase from './purchase';
import Admin from './admin';
import Supplier from './supplier';

Vue.use(Router);
const router = new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: Index,
    },
    {
      path: '/404',
      component: () => import('@/pages/404'),
    },

    // 采购
    ...Purchase,
    // 供应
    ...Supplier,
    // 集中采购中台
    ...Admin,
  ],
});

console.log('router', router);

export default router;
